import { defineStore } from "pinia";
import {shallowRef,reactive} from "vue";
import {ClassroomApi} from "@/api";


export default defineStore ("classroom",() => {
    let isInit: boolean = false;
    const allFuncs = reactive<Array<Vm.Classroom>>([]);
    const init = async () => {
        if (isInit) return;
        allFuncs.push(...await ClassroomApi.getAll())
        isInit=true;
    }
    return {allFuncs,init}
})